package train48days;

import java.util.Scanner;
import java.util.*;
public class 抄送列表 {
        public static void main(String[] args){
            Scanner sc = new Scanner(System.in);
            while(sc.hasNext()){
                String str = sc.nextLine();
                String target = sc.nextLine();
                char[] ch = str.toCharArray();
                int flag = 0;
                HashSet<String> set = new HashSet<>();
                String ret = "";
                for(int i = 0;i < ch.length;i++){
                    if (flag==0&&ch[i]=='"'){
                        flag=1;
                        set.add(ret);
                        ret="";
                    }else if (flag==1&&ch[i]=='"'){
                        flag=0;
                        set.add(ret);
                        ret="";
                    }else if (flag==1&&ch[i]!='"'){
                        ret+=ch[i];
                    }else if (flag==0&&ch[i]!=','){
                        ret+=ch[i];
                    }
                }
                set.add(ret);
                if (set.contains(target)){
                    System.out.println("Ignore");
                }else {
                    System.out.println("Important!");
                }
            }
        }
    }
